{{include template('public/header','admin')}}
<body>
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <div class="search">
                    <div class="well">
                        <form class="form-inline" action="" method="get"  id="search">
                            <div class="form-group">
                                <label>{{L('comment_dateline')}}</label>
                                <input type="text" name="startdate" class="calendar-icon form-control" value="{{ticky\request::get('startdate','')}}" style="width:110px;" onclick="showcalendar(event, this)"   />
                                <input type="text" name="enddate" class="calendar-icon form-control" value="{{ticky\request::get('enddate','')}}" style="width:110px;" onclick="showcalendar(event, this, false)"  />
                            </div>
                            <div class="form-group">
                                <label>{{L('keyword')}}</label>
                                <select name="type" class="form-control">
                                    <option value="uid" {{if ticky\request::get('type','') eq "uid" }} selected {{/if}}>{{L('comment_uid')}}</option>
                                    <option value="id" {{if ticky\request::get('type','') eq "id" }} selected {{/if}}>{{L('comment_id')}}</option>
                                    <option value="message" {{if ticky\request::get('type','') eq "message" }} selected {{/if}}>{{L('comment_message')}}</option>
                                    <option value="ip" {{if ticky\request::get('type','') eq "ip" }} selected {{/if}}>{{L('comment_ip')}}</option>
                                </select>
                                <input type="text" class="form-control" name="keyword" value="{{ticky\request::get('keyword','')}}" maxlength="15" tabindex="2" />
                            </div>
                            <button type="submit" class="btn btn-primary"><i class="fa fa-search" aria-hidden="true"></i>{{L('search')}}</button>
                            <a href="{{url('/comment/comment/add')}}" class="btn btn-primary">
                                <i class="fa fa-fw fa-plus"></i>{{L('add')}}
                            </a>
                        </form>
                    </div>
                </div>
            </div>
            <!-- /.col-lg-12 -->
        </div>
        <!-- /.row -->
        <div class="row">
            <div class="col-lg-12">
                <form method="post" action="/comment/comment/delete" class="form-inline" role="form">
                    <table id='Commentlist' class="table table-condensed table-hover table-striped tablesorter table-fixed table-selectable">
                        <thead>
                            <tr>
                                <th style="width: 15px;"><input type="checkbox" name="chk" class="checkbox" onclick="checkAll('prefix', this.form, 'ids', 'chk')" /></th>
                                <th>{{L('comment_uid')}}</th>
                                <th>{{L('comment_message')}}</th>
                                <th>{{L('comment_ip')}}</th>
                                <th>{{L('comment_status')}}</th>
                                <th>{{L('comment_dateline')}}</th>
                            </tr>
                        </thead>
                        <tbody>
                            {{foreach $items as $item}}
                            <tr>
                                <td><input type="checkbox" class="checkbox" name="ids[]" value="{{$item.cid}}" /></td>
                                <td >{{$item.uid}}</td>
                                <td >{{$item.message}}</td>
                                <td >{{$item.ip}}</td>
                                <td>{{update_status('comment','comment','cid',$item.cid,'status',$item.status)}}</td>
                                <td>{{date("Y-m-d H:i:s",$item.dateline)}}</td>
                            </tr>
                            {{/foreach}}
                        </tbody>
                        <tr>
                            <td colspan="15">
                                <div style="text-align: left;">
                                    <input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll('prefix', this.form, 'ids')" />{{L('chkall')}}
                                    <input type="radio" class="radio" id="optype_outer" name="optype" value="del" />{{L('delete')}}
                                    <input type="submit" class="btn" name="sendsubmit" value="{{L('submit')}}" />
                                    {{include template('public/page','admin')}}
                                </div>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
